package com.csst.business.service.impl;

import java.util.List;

import com.csst.business.dao.IAwardDao;
import com.csst.business.dao.TestDao;
import com.csst.business.model.Award;
import com.csst.business.model.Awresult;
import com.csst.business.model.TTrUser;
import com.csst.business.service.IAwardService;
import com.csst.business.service.TestService;

public class AwardServiceImpl implements IAwardService{
	private IAwardDao awardDao;

	public IAwardDao getAwardDao() {
		return awardDao;
	}

	public void setAwardDao(IAwardDao awardDao) {
		this.awardDao = awardDao;
	}

	@Override
	public void saveAwardData(Award award) {
		// TODO Auto-generated method stub
		awardDao.saveAwardData(award);
	}

	@Override
	public void saveAwresultData(Awresult awresult) {
		// TODO Auto-generated method stub
		awardDao.saveAwresultData(awresult);
	}

	@Override
	public int getAwardCount(String openid) {
		return awardDao.saveAwresultData(openid);
	}

	@Override
	public int getScrathCount(String openid) {
		// TODO Auto-generated method stub
		return awardDao.getScrathCount(openid);
	}

	@Override
	public int getResultTotle() {
		// TODO Auto-generated method stub
		return awardDao.getResultTotle();
	}

	@Override
	public List<Awresult> getAllResultList(int startNum, int endNum) {
		// TODO Auto-generated method stub
		return awardDao.getAllResultList(startNum,endNum);
	}

	@Override
	public void updateResult(String id) {
		// TODO Auto-generated method stub
		awardDao.updateResult(id);
	}

	@Override
	public int getResultByOpIdTotle(String userOpenId) {
		// TODO Auto-generated method stub
		return awardDao.getResultTotle(userOpenId);
	}

	@Override
	public List<Awresult> getAllResultList(String userOpenId, int startNum,
			int endNum) {
		// TODO Auto-generated method stub
		return awardDao.getAllResultList(userOpenId,startNum,endNum);
	}
}
